package top.superflow.db.api

import top.superflow.exception.RequestUnsupportedException

class DBIndex {
  
  private var _name : String = _
  private var _unique : Boolean = _
  private var _fieldList : List[String] = _
  private var _automatic : Boolean = _
  
  def name = _name
  def name_= (name : String ) = {
    this._name = name
  }
  
  
  def unique = _unique
  def unique_= (unique : Boolean ) = {
    this._unique = unique
  }
  
  def fieldList = _fieldList
  def fieldList_= (fieldList : List[String] ) = {
    this._fieldList = fieldList
  }
  
  def automatic = _automatic
  def automatic_= (automatic : Boolean) = {
    this._automatic = automatic
  }
  
  def containsKey(columnName : String) : Boolean = {
    throw new RequestUnsupportedException("Please override this method for specific data base.")
  }
}